//
//  UILabel+XXExtension.m
//  SHWheel
//
//  Created by YYKJ on 2020/11/17.
//  Copyright © 2020 YYKJ. All rights reserved.
//

#import "UILabel+XXExtension.h"

@implementation UILabel (XXExtension)

+ (UILabel *)xx_labelWithText:(NSString *)text textColor:(UIColor *)textColor font:(UIFont *)font {
    UILabel *label = [self xx_labelWithText:text textColor:textColor font:font backgroundColor:nil];
    return label;
}

+ (UILabel *)xx_labelWithText:(NSString *)text textColor:(UIColor *)textColor font:(UIFont *)font backgroundColor:(UIColor * __nullable)backgroundColor {
    UILabel *label = [[UILabel alloc] init];
    label.text = text;
    label.font = font;
    label.textColor = textColor;
    if (backgroundColor) { label.backgroundColor = backgroundColor; }
    return label;
}

@end
